/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : 
  * @brief          : 
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __PID_H
#define __PID_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
typedef struct 
{
	float kp;
	float ki;
	float kd;
	float upper;
	float lower;
	float integral;
	float last;
	float previous;
	float out;
}PIDControlStruct;
/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */


/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/

/* USER CODE BEGIN EFP */
void PID_Controller_Reset(void);
void PID_Parameters_Update(void);
float PID_Controller(PIDControlStruct * pid , float error);
float IncPID_Controller(PIDControlStruct * pid , float error);
/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

extern PIDControlStruct PIDControl_IQ;
extern PIDControlStruct PIDControl_ID;
extern PIDControlStruct PIDControl_V;
extern PIDControlStruct PIDControl_P;
#ifdef __cplusplus
}
#endif

#endif 
